#include "Buri.h"

using namespace std;

Buri::Buri() {
	setType("Buri");
	setSize(3);
	setSwim(true);
	setSpeed(486120); // Super light speed
	setAlive(true);
	setDirection(1);
}

void Buri::eat(){
	if (!isAlive()) return;
	if (getSize() >= 52) { // the fish exploded.
		setAlive(false);
		setSwim(false);
	}

	setSize(getSize() + 2);
	setSpeed(getSpeed() / 2);
	int i = (int) (getDirection() + 3.3) % 360;
	setDirection(i);
}

//void Buri::debug() const{
//	cout << "I am a " << getTypeStr() << endl;
//	cout << "My size is: " << getSize() << endl;
//	cout << "My speed is: " << getSpeed() << endl;
//	cout << "My direction is: " << getDirection() << endl;
//	cout << "My swimming situation is: " << isSwim() << endl;
//	cout << "My living situation is: " << isAlive() << endl;
//	cout << "---------------------------------------------" << endl;
//};